package com.resign.carl.lang;

/**
 * Created by carl.zhao on 2016/6/14.
 */
public enum RETURN_CODE implements EnumCode<Integer> {
    SUCCESS(0, "success"),
    FAIL(7999999, "fail"),
    SUBMIT_SUCCESS(1, "操作成功"),
    SUBMIT_FAIL(7999998, "操作失败"),
    ARGS_EMPTY(7999997, "参数为空"),
    VERSION_NOT_MATCH(7999997, "数据版本不匹配"),
    DATA_UNIQUE(7999996, "数据不唯一"),
    UNSUPPORTED_DATATYPEVALUE(7999996, "不支持的数据类型值"),
    OBJECT_DELETED(7999995, "对象不存在"),
    ARGS_ERROR(7999994, "参数错误"),
    MERCHANT_ID_DISEXIST(7999993, "商户id不存在"),
    SERVICE_EXCEPTION(7999992, "服务异常"),
    GET_BUSINESS_EXCEPTION(7999991, "商户信息不存在"),
    REFLECT_METHOD_INVOCATION_EXCEPTION(7999990, "反射方法调用异常"),
    DB_SHARD_EXCEPTION(7999989, "分表异常");

    private Integer key;
    private String desc;
    RETURN_CODE(Integer key, String desc){
        this.key = key;
        this.desc = desc;
    }
    @Override
    public Integer getKey() {
        return this.key;
    }

    @Override
    public String getDescription() {
        return this.desc;
    }
}
